Skip to content

Conversation

@kaffarell
Copy link
Member

@kaffarell kaffarell commented Oct 31, 2025

This enables configuration to be conditionally applied based on the hostname set in operation.hostname. Users can now use --when.hostnames = ["host-a", "host-b"] in their config files to apply settings only on specific machines. I think this would be a great addition as e.g. I have the same folder structure on my work and personal machine, so I can't use --when.repositories to distinguish config scopes.

This is my first contribution to jj, so if I did something wrong let me know!

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes

@kaffarell kaffarell requested a review from a team as a code owner October 31, 2025 21:05
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Can you include the issue number in commit description?

#6441

@kaffarell kaffarell force-pushed the push-quymyxnmxpkw branch 2 times, most recently from 971eddb to a8716d5 Compare November 2, 2025 13:45
@kaffarell kaffarell requested a review from yuja November 2, 2025 21:03
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

This enables configuration to be conditionally applied based on the
hostname set in `operation.hostname`. Users can now use
`--when.hostnames = ["host-a", "host-b"]` in their config files to apply
settings only on specific machines.

Fixes: jj-vcs#6441
@kaffarell kaffarell requested a review from yuja November 3, 2025 17:16
@kaffarell kaffarell added this pull request to the merge queue Nov 4, 2025
Merged via the queue into jj-vcs:main with commit df1b452 Nov 4, 2025
30 checks passed
@kaffarell kaffarell deleted the push-quymyxnmxpkw branch November 4, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants